<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf" %>
<script type="text/javascript" src="${ctx}/js/hr/staff_edit.js"></script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}
label[class^="btn btn-default"]{
	margin-top: -4px;
}
</style>
<script type="text/javascript" src="${ctx}/js/jedate/jedate.js"></script>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/hrelectricity/electricity_editEntity.shtml">
		 <input type="hidden" class="form-control " name="electricityFormMap.id" value="${electri.id}"/>
		 <input type="hidden" class="form-control " name="beforeMoney" value="${electri.money}" />
		<table width="50%" cellpadding="0" cellspacing="0" class="layui-table" >
			<tr>
				<td >宿舍名称</td>
                <td colspan="60" >
                ${electri.gname}	
                </td>
			</tr>
			<tr>
                <td rowspan="${count+1}">住宿人员信息</td>
				<td>姓名</td>
				<td>工号</td>
				<td>所在部门</td>
			</tr>
			<c:forEach items="${staff}" var="key">			
					<tr>
						<td>
					    ${key.name }
						</td>
						<td>
						${key.job_number}
						</td>
						<td>
						${key.dname}
						<input type="hidden" class="form-control "
					     name="staffFormMap.ID" value="${key.id}"/>
						</td>
					</tr>
			</c:forEach>
			<tr></tr>
			<tr>
			<td>用电度数</td>
			<td colspan="60" style="padding: 0px;">
			<input type="text" class="form-control  number"
					name="electricityFormMap.degree" value="${electri.degree}" style="border: 0px;
    margin: 0px;
    -webkit-box-shadow: none;
    box-shadow: none;" />
			</td>
			</tr>
						<tr>
			<td>每度电金额</td>
				<td colspan="60" style="padding: 0px;">
					<input type="text" class="form-control numberMoney"
					value="" style="border: 0px;
    margin: 0px;
    -webkit-box-shadow: none;
    box-shadow: none;" />
				</td>

			</tr>
			<tr>
			<td>总金额</td>
				<td colspan="60" style="padding: 0px;">
					<input type="text" class="form-control tatalMoney "
					name="electricityFormMap.money" value="${electri.money}" style="border: 0px;
    margin: 0px;
    -webkit-box-shadow: none;
    box-shadow: none;" />
				</td>

			</tr>
		</table>
				<footer class="panel-footer text-right bg-light lter">
			<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> 

	</form>	
	<script src="/static/build/layui.js"></script>
<script type="text/javascript">
$(function(){
	$(".number").change(function(){
		$(".tatalMoney").val($(this).val()*$(".numberMoney").val());
	})
	
});
$(function(){
	$(".numberMoney").change(function(){
		$(".tatalMoney").val($(this).val()*$(".number").val());
	})
	
});

</script>
</body>
</html>